<template>
	<view class="calc addressAre borderR">
		<view class="display flow addressItemAre" @click="addressBtn" v-if="isAddress">
			<view class="display column addressItem">
				<text class="addressName">{{addressList.name}}  {{addressList.phone}}</text>
				<text class="pColor">{{addressList.sheng}}{{addressList.shi}}{{addressList.qu}}{{addressList.address}}</text>
			</view>
			<uni-icons :type="'arrowright'" :color="'grey'" size="16" v-if="!isOrder"/>
		</view>
		<view class="display flow addressItemAre" style="justify-content: center;" @click="newAddressBtn" v-else>
			<text>+点击添加收获地址</text>
		</view>
	</view>
</template>

<script>
	
	export default {
		name: 'address',
		props: ['addressList','isAddress','isOrder'],
		data() {
			return {
				
			};
		},
		methods:{
			newAddressBtn(){
				uni.navigateTo({
					url: '/subPackages/mine/newAddress/newAddress?isOne=' + true
				})
			},
			addressBtn(){
				if(this.isOrder == true){
					return
				}
				uni.navigateTo({
					url: '/subPackages/mine/addressAre/addressAre?type=' + 2
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.addressAre{
		@include font;
		@include margin(20rpx,'top');
		@include padding(30rpx);
		@include backG(white,$greyColor)
		.addressItemAre{
			.addressItem{
				@include font($fontSize + 2rpx,$blackColor);
				.addressName{
					font-weight: bold;
					@include margin(20rpx,'bottom');
				}
			}
		}
		
	}
</style>
